package com.qhhc.mapper;

import com.qhhc.entity.CarDealer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CarDealerMapper {
    
    List<CarDealer> selectAllDealers();
    
    CarDealer selectDealerById(Long id);
    
    CarDealer selectDealerByUserId(Long userId);
    
    List<CarDealer> searchDealers(Map<String, Object> params);
    
    int insertDealer(CarDealer dealer);
    
    int updateDealer(CarDealer dealer);
    
    int deleteDealer(Long id);
    
    int deleteDealerByUserId(Long userId);
    
    List<CarDealer> selectDealersByPage(@Param("offset") int offset, @Param("limit") int limit);
    
    int selectDealerCount();
} 